cmake_minimum_required(VERSION 3.0.0)
project(DesignPattern VERSION 0.1.0)

include(CTest)
enable_testing()

add_definitions(-std=c++17)

include_directories(./ ./singleshot ./common ./factory ./observe ./mytest)
add_subdirectory(singleshot)
add_subdirectory(factory)
add_subdirectory(common)
add_subdirectory(observe)
add_subdirectory(mytest)

add_executable(DesignPattern main.cpp "factory/abfactory.cpp" "factory/abfactory.h")

target_link_libraries(DesignPattern singleshot)
target_link_libraries(DesignPattern common)
target_link_libraries(DesignPattern factory)
target_link_libraries(DesignPattern mytest)
target_link_libraries(DesignPattern observe)

set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
